package com.fzy.designpattern.proxy;

public class ProxyStar implements Star{

    private RealStar realStar;

    public ProxyStar(RealStar realStar) {

        this.realStar = realStar;
    }

    @Override
    public void meeting() {
        System.out.println("开会");
    }

    @Override
    public void bookTicket() {
        System.out.println("订票");
    }

    @Override
    public void collectMoney() {
        System.out.println("收钱");
    }

    @Override
    public void acting() {//aop编程的原理
        System.out.println("代理类做一些前置操作");
        realStar.acting();
        System.out.println("代理类做一些后置操作");
    }

}
